#@layout()
#define main()
<h1>预约管理&nbsp;&nbsp;
    <a href="/orders/add">创建预约</a>
</h1>
#include("_search.html")
<div class="table_box">
    <table class="list">
        <tbody>
        <tr>
            <th width="4%" style="text-align:center;">id</th>
            <th width="15%" style="text-align:center;">学生学号</th>
            <th width="15%" style="text-align:center;">图书索引号</th>
            <th width="15%" style="text-align:center;">图书副本编号</th>
            <th width="15%" style="text-align:center;">预约时间</th>
            <th width="8%" style="text-align:center;">状态</th>
            <th width="15%" style="text-align:center;">操作</th>
        </tr>

        #for(x : orderPage.getList())
        <tr>
            <td style="text-align:center;">#(x.id)</td>
            <td style="text-align:center;">#(x.studentid)</td>
            <td style="text-align:center;">#(x.bookid)</td>
            <td style="text-align:center;">#(x.bookcopyid)</td>
            <td style="text-align:center;">#(x.ordertime)</td>
            <td style="text-align:center;">#(x.isorder==0?"预约":"取消")</td>
            <td style="text-align:center;">
                &nbsp;&nbsp;<a href="/orders/delete/#(x.id)">删除</a>
                #if(x.isorder==0)
                &nbsp;&nbsp;<a href="/orders/edit/#(x.id)">修改</a>
                &nbsp;&nbsp;<a href="/orders/isorder/#(x.id)">取消预约</a>
                #end
                #if(x.isorder==1)
                &nbsp;&nbsp;<a href="/orders/isnoorder/#(x.id)">恢复预约</a>
                #end
            </td>
        </tr>
        #end
        </tbody>
    </table>
    #@paginate(orderPage.pageNumber, orderPage.totalPage, "/orders/")
</div>
#end